pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let temp_str: Vec<&str> = num_str[..num_str.len() - 1].split("(").collect();

    let old_base = temp_str[1].parse::<u32>().unwrap();
    let mut old_num = u32::from_str_radix(temp_str[0], old_base).unwrap();
    // println!("old_base: {}, old_num: {}", old_base, old_num);
    
    let mut result = String::new();
    while old_num > 0 {
        let rem = old_num % to_base;
        let rem_char = if rem < 10 {
            (rem as u8 + b'0') as char
        } else {
            (rem - 10 + 'a' as u32) as u8 as char
        };
        result.push(rem_char);
        old_num /= to_base;
    }
    result.chars().rev().collect()
}
